<template>
  <div class="main-monitor">
      <a-row :gutter="16" style="padding-top:12px">
        <a-col :span="8">
          <a-card title="累计日访问量">
             <h3>1200次</h3>
             <p>日均访问500次</p>
          </a-card>
        </a-col>
        <a-col :span="8">
          <a-card title="累计日访问量">
            <h3>1200次</h3>
            <p>日均访问500次</p>
          </a-card>
        </a-col>
        <a-col :span="8">
          <a-card title="累计日访问量">
             <h3>1200次</h3>
             <p>日均访问500次</p>
          </a-card>
        </a-col>
      </a-row>
      <a-card style="margin-top:4px">
          <div id="main" style="width: 75%;height:400px;"></div>
      </a-card>
  </div>
</template>

<script>
import * as echarts from 'echarts';
export default {
  name: 'monitor',
  data() {
    return {

    }
  },
  mounted() {
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        title: {
            text: '销售趋势'
        },
        tooltip: {},
        legend: {
            data:['销量']
        },
        xAxis: {
            data: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]
        },
        yAxis: {},
        series: [{
            name: '销量',
            type: 'bar',
            data: [5, 20, 36, 10, 10, 20, 5, 20, 36, 10, 10, 23]
        }]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
  }
}
</script>

<style scoped lang="less">
.main-monitor{
  padding: 0 12px;
  background-color: rgb(218, 212, 212);
  height: calc(100vh - 184px);
  
}
</style>
